package ThreadDemo;
import java.time.LocalDateTime;
public class ThreadDemo {
    public static void main(String[] args) {
        System.out.println("朱秉柯 183080106");
        for(int i = 0; i < 5; i++)
            new myThread1().start();
        new myThread2().start();
    }
}
class myThread1 extends Thread{
    public void run() {
        super.run();
        System.out.println(Thread.currentThread().getName());
    }
}
class myThread2 extends Thread{
    public void run() {
        while (true){
            System.out.println(LocalDateTime.now());
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
